/********************************************************************
	created:	2014/08/06
	created:	6:8:2014   10:34
	filename: 	select_platform_config
	file ext:	h
	author:		liyiysngg@gmail.com
	
	purpose:	locate which platform we are on and define XLL_PLATFORM_CONFIG as needed.
	
	remarks:	
*********************************************************************/

#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
#  define XLL_PLATFORM_CONFIG "config/platform/linux.h"

#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
// BSD:
#  define XLL_PLATFORM_CONFIG "config/platform/bsd.h"

#elif defined(sun) || defined(__sun)
// solaris:
#  define XLL_PLATFORM_CONFIG "config/platform/solaris.h"

#elif defined(__sgi)
// SGI Irix:
#  define XLL_PLATFORM_CONFIG "config/platform/irix.h"

#elif defined(__hpux)
// hp unix:
#  define XLL_PLATFORM_CONFIG "config/platform/hpux.h"

#elif defined(__CYGWIN__)
// cygwin is not win32:
#  define XLL_PLATFORM_CONFIG "config/platform/cygwin.h"

#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// win32:
#  define XLL_PLATFORM_CONFIG "config/platform/win32.h"

#elif defined(__BEOS__)
// BeOS
#  define XLL_PLATFORM_CONFIG "config/platform/beos.h"

#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
// MacOS
#  define XLL_PLATFORM_CONFIG "config/platform/macos.h"

#elif defined(__IBMCPP__) || defined(_AIX)
// IBM
#  define XLL_PLATFORM_CONFIG "config/platform/aix.h"

#elif defined(__amigaos__)
// AmigaOS
#  define XLL_PLATFORM_CONFIG "config/platform/amigaos.h"

#elif defined(__QNXNTO__)
// QNX:
#  define XLL_PLATFORM_CONFIG "config/platform/qnxnto.h"

#elif defined(__VXWORKS__)
// vxWorks:
#  define XLL_PLATFORM_CONFIG "config/platform/vxworks.h"

#elif defined(__SYMBIAN32__) 
// Symbian: 
#  define XLL_PLATFORM_CONFIG "config/platform/symbian.h" 

#elif defined(_CRAYC)
// Cray:
#  define XLL_PLATFORM_CONFIG "config/platform/cray.h" 

#elif defined(__VMS) 
// VMS:
#  define XLL_PLATFORM_CONFIG "config/platform/vms.h" 
#else

#  if defined(unix) \
      || defined(__unix) \
      || defined(_XOPEN_SOURCE) \
      || defined(_POSIX_SOURCE)

   // generic unix platform:

#  ifndef XLL_HAS_UNISTD_H
#     define XLL_HAS_UNISTD_H
#  endif

#  include "config/posix_features.h"

#  endif

#  if defined (XLL_ASSERT_CONFIG)
      // this must come last - generate an error if we don't
      // recognize the platform:
#     error "Unknown platform "
#  endif

#endif



